package com.wen.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wen.mapper.CartMapper;
import com.wen.mapper.GatherDetailsMapper;

import com.wen.pojo.Cart;
import com.wen.pojo.GatherDetails;
import com.wen.pojo.dto.GatherDetailsDto;
import com.wen.service.CartService;
import com.wen.service.GatherDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class GatherDetailsServiceImpl extends ServiceImpl<GatherDetailsMapper, GatherDetails> implements GatherDetailsService {

   @Autowired
   private GatherDetailsMapper mapper;
    @Override
    public List<GatherDetailsDto> GatherDetailsById(String id) {
        List<GatherDetailsDto> gatherDetailsDto = mapper.GatherDetailsById(id);
        return gatherDetailsDto;
    }

    @Override
    public int getUpdateAmount(String id, String amount) {

            return mapper.updateAmount(amount,id);
    }

}
